package mabs.action;

import java.io.IOException;
import java.sql.SQLException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import mabs.dao.BbsQuery;
import mabs.etc.ContentBean;
import mabs.etc.Policy;

import kjmvc.KJAction;

public class WriteAction extends KJAction{

	public WriteAction(HttpServletRequest request, HttpServletResponse response)
			throws IOException {
		super(request, response);
	}

	@Override
	public String doAction() throws ServletException, IOException, SQLException {
		ContentBean content = new ContentBean();
		content.setBean(request);
		
		BbsQuery query = new BbsQuery();
		query.writeContent(content);
		
		return Policy.MABS+"/mabs.jsp";
	}

}
